<!DOCTYPE html>
<html>

<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width,initial-scale=1.0'>
    <meta http-equiv='X-UA-Compatible' content='ie=edge'>
    <title>Document</title>
</head>

<body>
    <div id='app'>
        <!-- v-model:绑定表单元素 -->
        <p>{{msg}}</p>
        <!-- <input v-model="msg"> -->
        <!-- 
            1 给input绑定事件  -> @或者v-on:事件名
            2 事件对应的函数 获取value值 -> 数据驱动视图 / input的value值 v-bind:value
            3 把value值赋值给p标签的内容 
        -->
        <!-- <input
              v-bind:value="msg" 
              @input="把最新的value值赋值给msg"> -->
        <!-- <input v-model="msg"> -->
        <!-- 了解: -->
        <input v-bind:value="msg" @input="msg=$event.target.value">

    </div>
    <script src='./vue.js'></script>
    <script>
        new Vue({
            el: '#app',
            data: {
                msg: 'abc'
            },
            methods: {

            }
        });
    </script>
</body>

</html>